﻿/**********************************************************************
 * @file   FITKAcousticsSolverLoadCase.h
 * @brief  求解的载荷工况数据声明
 * @author liuzhonghua (liuzhonghuaszch@163.com)
 * @date   2025-02-21
 *********************************************************************/
#ifndef _FITKACOUSTICS_SOLVERLOADCASE__H___
#define _FITKACOUSTICS_SOLVERLOADCASE__H___
 
#include "FITKAcousticsPhysicsAPI.h"
#include "FITK_Kernel/FITKCore/FITKAbstractNDataObject.h"
#include "FITK_Kernel/FITKCore/FITKAbstractDataManager.hpp"

namespace Acoustics
{
    class FITKAcousticsAbstractLoad;
    /**
     * @brief  求解的载荷工况数据
     * @author liuzhonghua (liuzhonghuaszch@163.com)
     * @date   2025-02-11
     */
    class FITKAcousticsPhysicsAPI FITKAcousticsSolverLoadCase : public Core::FITKAbstractNDataObject
    {
        Q_OBJECT
    public:
        /**
         * @brief  Construct a new FITKAcousticsSolverLoadCase object
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2025-02-11
         */
        explicit FITKAcousticsSolverLoadCase();
        /**
         * @brief  Destroy the FITKAcousticsSolverLoadCase object
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2025-02-11
         */
        virtual ~FITKAcousticsSolverLoadCase();
        /**
         * @brief    添加组数据
         * @param[i] loadID 
         * @param[i] index -1:追加 >=0:插入
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-02-11
         */
        void addLoad(int loadID, int index = -1);
        /**
         * @brief    获取载荷
         * @return   QList<int>
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-02-11
         */
        QList<int> getLoadIDs();
        /**
         * @brief    获取组数据对象通过下标
         * @param[i] index
         * @return   Core::FITKAbstractNDataObject*
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-02-11
         */
        FITKAcousticsAbstractLoad* getLoadDataObjAt(int index);
        /**
         * @brief    清理载荷
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-02-21
         */
        void clearLoad();

    private:
        /**
         * @brief  数据
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2025-02-11
         */
        QList<int> _loadIDList;
    };

    /**
     * @brief  求解的载荷工况数据管理器
     * @author liuzhonghua (liuzhonghuaszch@163.com)
     * @date   2024-12-13
     */
    class FITKAcousticsPhysicsAPI FITKSolverLoadCaseManager : public Core::FITKAbstractDataObject,
        public Core::FITKAbstractDataManager<FITKAcousticsSolverLoadCase>
    {
    public:
        /**
         * @brief Construct a new FITKSolverLoadCaseManager object
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-12-13
         */
        explicit FITKSolverLoadCaseManager() = default;
        /**
         * @brief Destroy the FITKSolverLoadCaseManager object
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date   2024-12-13
         */
        virtual ~FITKSolverLoadCaseManager() = default;
    };
}


#endif
